#include <stdio.h>
#include <sys/time.h>

long long get_timestamp(void)
{
    long long tmp;
    struct timeval tv;
    gettimeofday(&tv, NULL);
    tmp = tv.tv_sec;
    tmp = tmp * 1000;
    tmp = tmp + (tv.tv_usec / 1000);
    return tmp;
}

int main(void)
{
    long long t = get_timestamp();

    char name[20];
    sprintf(name, "%d.log", t);

    printf("name: %s\n", name);

    return 0;
}